package com.yunxin.user;

//import com.yunxin.core.point.utils.DateCodeUtil;
import com.yunxin.core.utils.infra.mgb.ExtendMybatisGenerator;
import org.springframework.util.ObjectUtils;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.util.Date;

/**
 *
 * @author zero°
 * @since 2023-05-22
 */
public class MybatisGeneratorEntry {

    public static void main(String[] args) throws Exception {
        LocalTime startLocalTime = LocalTime.parse("12:00");
        LocalTime endLocalTime = LocalTime.parse("15:00");
        LocalDate nowDate = LocalDate.now();
        // 将它们组合成一个LocalDateTime
        LocalDateTime startDateTime = LocalDateTime.of(nowDate, startLocalTime);
        // 将LocalDateTime转换为Date
        Date startDate = Date.from(startDateTime.atZone(ZoneId.systemDefault()).toInstant());
        System.out.println(startDate);
        LocalDateTime endDateTime = LocalDateTime.of(nowDate, endLocalTime);
        Date endDate = Date.from(endDateTime.atZone(ZoneId.systemDefault()).toInstant());
        System.out.println(endDate);

    }
}
